home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Tools / vtcl / doc / CallDel.3 < prev    next >
Encoding:
Text File  |  1995-07-10  |  3.3 KB  |  90 lines

  1. '\"
  2. '\" Copyright (c) 1993 The Regents of the University of California.
  3. '\" All rights reserved.
  4. '\"
  5. '\" Permission is hereby granted, without written agreement and without
  6. '\" license or royalty fees, to use, copy, modify, and distribute this
  7. '\" documentation for any purpose, provided that the above copyright
  8. '\" notice and the following two paragraphs appear in all copies.
  9. '\"
  10. '\" IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
  11. '\" FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
  12. '\" ARISING OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
  13. '\" CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  14. '\"
  15. '\" THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
  16. '\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
  17. '\" AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
  18. '\" ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
  19. '\" PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
  20. '\" 
  21. '\" $Header: /user6/ouster/tcl/man/RCS/CallDel.3,v 1.3 93/09/09 16:49:23 ouster Exp $ SPRITE (Berkeley)
  22. '\" 
  23. '\"----------------------------------------------------------------------------
  24. '\"    @(#) CallDel.3 26.1 93/10/22 SCOINC
  25. '\"
  26. '\"     Copyright (C) The Santa Cruz Operation, 1992-1993.
  27. '\"     This Module contains Proprietary Information of
  28. '\"    The Santa Cruz Operation, and should be treated as Confidential.
  29. '\"----------------------------------------------------------------------------
  30. .so ../man.macros
  31. .HS Tcl_CallWhenDeleted tclc 7.0
  32. .BS
  33. .SH NAME
  34. .na
  35. Tcl_CallWhenDeleted, Tcl_DontCallWhenDeleted \- Arrange for callback when interpreter is deleted
  36. .ad
  37. .SH SYNOPSIS
  38. .nf
  39. \fB#include <tcl.h>\fR
  40. .sp
  41. \fBTcl_CallWhenDeleted\fR(\fIinterp\fR, \fIproc\fR, \fIclientData\fR)
  42. .sp
  43. \fBTcl_DontCallWhenDeleted\fR(\fIinterp\fR, \fIproc\fR, \fIclientData\fR)
  44. .SH ARGUMENTS
  45. .AS Tcl_InterpDeleteProc clientData
  46. .AP Tcl_Interp *interp in
  47. Interpreter with which to associated callback.
  48. .AP Tcl_InterpDeleteProc *proc in
  49. Procedure to call when \fIinterp\fR is deleted.
  50. .AP ClientData clientData in
  51. Arbitrary one-word value to pass to \fIproc\fR.
  52. .BE
  53.  
  54. .SH DESCRIPTION
  55. .PP
  56. \fBTcl_CallWhenDeleted\fR arranges for \fIproc\fR to be called by
  57. \fBTcl_DeleteInterp\fR if/when \fIinterp\fR is deleted at some future
  58. time.  \fIProc\fR will be invoked just before the interpreter
  59. is deleted, but the interpreter will still be valid at the
  60. time of the call.
  61. \fIProc\fR should have arguments and result that match the
  62. type \fBTcl_InterpDeleteProc\fR:
  63. .nf
  64. .RS
  65. typedef int Tcl_InterpDeleteProc(
  66. .RS
  67. ClientData \fIclientData\fR,
  68. Tcl_Interp *\fIinterp\fR);
  69. .RE
  70. .RE
  71. .fi
  72. The \fIclientData\fP and \fIinterp\fR parameters are
  73. copies of the \fIclientData\fP and \fIinterp\fR arguments given
  74. to \fBTcl_CallWhenDeleted\fR.
  75. Typically, \fIclientData\fR points to an application-specific
  76. data structure that \fIproc\fR uses to perform cleanup when an
  77. interpreter is about to go away.
  78. \fIProc\fR does not return a value.
  79. .PP
  80. \fBTcl_DontCallWhenDeleted\fR cancels a previous call to
  81. \fBTcl_CallWhenDeleted\fR with the same arguments, so that
  82. \fIproc\fR won't be called after all when \fIinterp\fR is
  83. deleted.
  84. If there is no deletion callback that matches \fIinterp\fR,
  85. \fIproc\fR, and \fIclientData\fR then the call to
  86. \fBTcl_DontCallWhenDeleted\fR has no effect.
  87.  
  88. .SH KEYWORDS
  89. callback, delete, interpreter
  90.